# debugtalk.py

import time
import datetime
#获取时间戳
def getTime():
    t = int(time.time())
    #毫秒级时间
    #nowTime = lambda:int(round(t * 1000))
    return t
    
import pymysql
def dbchange(id):
    #配置数据库连接
    db = pymysql.connect("47.99.74.38", "root", "3Henniubi", "qts_activity")
    cursor = db.cursor()
    #sql模板
    sql = "update activity_config set name = '陈驰23' where id = %d "
    #执行sql
    cursor.execute(sql % (int(id)))
    db.commit()

def sleep(t):
    time.sleep(t)
